package com.syh.jn.scm.service.api.supplier.finance.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

public interface BusinessAccountSummaryEnums {

  /**
   * 应收付汇总客户类型
   */
  @AllArgsConstructor
  @Getter
  public enum CustomerType {
    //客户类型: 0上游, 1下游, 2物流
    UPSTREAM(Short.valueOf("0"), "供应商", "往来单位类型"),
    DOWNSTREAM(Short.valueOf("1"), "采购商", "往来单位类型"),
    LOGISTICS(Short.valueOf("2"), "物流公司", "往来单位类型");

    private Short status;
    private String statusName;
    private String statusBelong;

    @Override
    public String toString() {
      return this.status.toString();
    }

    public static CustomerType valueOf(Short status) {
      switch (status) {
        case 0:
          return UPSTREAM;
        case 1:
          return DOWNSTREAM;
        case 2:
          return LOGISTICS;
      }
      return null;
    }
  }
}
